package cn.edu.njuit.lesson9heros;

import cn.edu.njuit.lesson9heros.pojo.Team;
import cn.edu.njuit.lesson9heros.service.GameService;
import cn.edu.njuit.lesson9heros.service.ImplFactory;
import cn.edu.njuit.lesson9heros.service.TeamService;

/**
 * 游戏启动器
 */
public class GameStarter {
    public void start(){
        //1、使用team服务完成组队
        TeamService teamService = ImplFactory.getTeamService();
        Team blueTeam=teamService.getTeam();
        Team redTeam=teamService.getTeam();
        //2、使用游戏服务启动游戏，启动游戏时需要两支队伍
        GameService gameService=ImplFactory.getGameService();
        gameService.play(blueTeam,redTeam);
    }

    //游戏启动类
    public static void main(String [] args){
        GameStarter gameStarter=new GameStarter();
        gameStarter.start();
    }
}
